package thread;

public class ThreadDemo2 {
    public static void main(String[] args) {
        Runnable mr1=new MyRundable1();
        Runnable mr2=new MyRundable2();
        Thread t1=new Thread(mr1);
        Thread t2=new Thread(mr2);
        t1.start();
        t2.start();
    }
}

class MyRundable1 implements Runnable{
    public void run(){
        for(int i = 0 ; i < 1000; i ++){
            System.out.println("你好你好你好");
        }
    }
}
class MyRundable2 implements Runnable{
    public void run(){
        for(int i = 0 ; i < 1000; i ++){
            System.out.println("aaaaaaaaaaaa");
        }
    }
}
